1. Field of the Invention
This invention relates to caching of objects, and more particularly to substituting strings of bytes into an object at vend time as the object is being streamed to a client. The invention is applicable to any software system characterized by fill and vend cycles, where the vended content is some transformation of the filled content. For example, the invention is applicable for one vend, or for many vends, following a fill operation. For example, the invention is applicable to Internet caching, and to any other fill and vend application.
2. Background Information
There are various applications for storing data in a cache, and retrieving the data at a later time, with other data added into the originally cached data. For example, a computer application may cache a web page at a first time referred to as the “fill” time, and retrieve the data at later times referred to as the “vend” times. An example of such an application is the insertion of advertisements appropriate to each user requesting the web page. The basic web page is first cached, then when a user requests the page, the advertisements appropriate for that user are determined and inserted into the web page as it is being vended to the user.
The presently used method is to scan the entire web page, normally written in Hyper Text Markup Language (HTML) each time that the page is vended from the cache. The scan finds the locations within the page where the advertisements are to be placed. The contents of these sections of the page, typically universal resource locator (URLs) for default or dummy advertisements are then replaced by the URLs of advertisements chosen for the requestor.
However, scanning a web page as it is being vended is a wasteful method of inserting external data into the page because the locations where the advertisements, or other data are to be inserted into the web page are always the same each time the page is vended.
There is needed a better method for adding desired data at fixed locations into a cached data stream.